<style>
    .setimg {
        margin: -2px 5px 0 0
    }

    a:hover {
        cursor: pointer;
    }

    .color_red {
        color: red;
    }

    .color_purple {
        color: purple;
    }

    .color_orange {
        color: orange;
    }

    #addform .file {
        position: relative;
    }

    #addform .file span {
        position: absolute;
        right: 80px;
        top: 15px;
        background-color: #414959;
        padding: 2px 6px;
        height: 23px;
        line-height: 23px;
        cursor: pointer;
        color: #fff;
        font-size: 14px;
        overflow: hidden;
        background-image: linear-gradient(to bottom, #6c7994, #414959);
        border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
        border: 1px solid #363d4a;
        display: inline-block;
        *display: inline;
        *zoom: 1;
    }

    #addform .file span input {
        position: absolute;
        font-size: 100px;
        left: 0;
        top: 0;
        opacity: 0;
        filter: alpha(opacity=0);
        cursor: pointer;
    }
</style>
<div class="row-fluid">
    <a style="border:1px solid #ccc" class="block-heading" data-toggle="collapse">列表数据</a>
    <div class="well">
        <a href="/excel/exportSuppliesUsedData?warehouse=<?=I('get.warehouse')?>&group_place=<?=I('get.group_place')?>&stime=<?=I('get.stime')?>&etime=<?=I('get.etime')?>"><button class="btn btn-primary" style="position:relative;float:right;padding:4px 6px;margin-right:40px;margin-top: 10px;">导出报表</button></a>

        <div class="btn-toolbar">
            <form>
                <select name="warehouse" class="warehouse" style="width:100px;">
                    <option value="">仓库/全部</option>
                    <foreach name="warehouse" item="vo" key="ke">
                        <option value="<?=$vo['warehouse_id']?>" <?=$vo['warehouse_id'] == I('get.warehouse')? 'selected': ''?>><?=$vo['warehouse_name']?></option>
                    </foreach>
                </select>

                <!--<select name="type" class="type" style="width:100px;margin-left: 5px;">-->
                    <!--<option value="">物品/全部</option>-->
                    <!--<foreach name="kinds" item="vo2" key="ke2">-->
                        <!--<option value="<?=$vo2?>" <?=$vo2 == I('get.type')? 'selected': ''?>><?=$vo2?></option>-->
                    <!--</foreach>-->
                <!--</select>-->

                <select name="take_place" class="take_place" style="width:120px;margin-left: 5px;">
                    <option value="">领取地/全部</option>
                    <foreach name="take_place" item="vo3" key="ke3">
                        <option value="<?=$vo3['take_place']?>" <?=$vo3['take_place'] == I('get.take_place')? 'selected': ''?>><?=$vo3['take_place']?></option>
                    </foreach>
                </select>

                <input readonly name="stime" class="input input-medium" onclick='WdatePicker({dateFmt:"yyyy-MM-dd"})' type="text" placeholder="领用时间-开始" value="<?=I('get.stime')?>" style="margin-left: 5px;width: 100px;"/>&nbsp;
                <input readonly style="margin-left:10px;width: 100px;" name="etime" placeholder="领用时间-结束" class="input input-medium" onclick='WdatePicker({dateFmt:"yyyy-MM-dd"})' type="text" value="<?=I('get.etime')?>"/>
                <input type="hidden" value="<?=I('get.res')?>" name="res"/>
                <button class="btn btn-info" style="margin:-9px 0 0 15px"><i class="icon-search"></i> 查询</button>
            </form>
        </div>

        <hr>
        <table class="table">
            <thead>
            <tr>
                <th style="text-align:center;width:170px">序号</th>
                <th style="text-align:center;width:170px">药品编号</th>
                <th style="text-align:center;width:170px">种类</th>
                <th style="text-align:center;width:170px">名称</th>
                <th style="text-align:center;width:170px">所属仓库</th>
                <th style="text-align:center;width:170px">规格型号</th>
                <th style="text-align:center;width:170px">单位</th>
                <th style="text-align:center;width:170px">领出量</th>
                <th style="text-align:center;width:170px">领取地点</th>
                <th style="text-align:center;width:140px">领取人</th>
                <th style="text-align:center;width:140px">领用时间</th>
            </tr>
            </thead>
            <tbody>
            <?php if($getData){foreach($getData AS $key=>$val){ ?>
            <tr>
                <td style="text-align:center;vertical-align:middle;"><?=$key+1?></td>
                <td style="text-align:center;vertical-align:middle;"><?=$val['drug_no']?></td>
                <td style="text-align:center;vertical-align:middle;"><?=$val['type']?></td>
                <td style="text-align:center;vertical-align:middle;"><?=$val['drug_name']?></td>
                <td style="text-align:center;vertical-align:middle;"><?=$val['warehouse']?></td>
                <td style="text-align:center;vertical-align:middle;"><?=$val['drug_size']?></td>
                <td style="text-align:center;vertical-align:middle;"><?=$val['drug_unit']?></td>
                <td style="text-align:center;vertical-align:middle;"><?=$val['take_num']?></td>
                <td style="text-align:center;vertical-align:middle;"><?=$val['take_place']?></td>
                <td style="text-align:center;vertical-align:middle;"><?=$val['take_users']?></td>
                <td style="text-align:center;vertical-align:middle;"><?=$val['take_date']?></td>
            </tr>
            <?php }}else{?>
            <tr>
                <td style="text-align:center" colspan=11>暂无数据</td>
            </tr>
            <?php }?>
            </tbody>
        </table>
        <span style="float:right;margin-top:-44px"><?=$page?></span>
    </div>
</div>
<script>
    $(function () {
        $('.decate').live('click', function () {
            if (!window.confirm('确认删除吗 ?')) {
                return false;
            }
            window.location = $(this).attr('href');
        });
    })
</script>


